<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>测试文档无标题</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
    </style>
</head>
<body>
	<h1>Hello</h1>
	
	<script src="https://cdn.staticfile.org/jquery/3.5.1/jquery.js"></script>
	<script type="text/javascript">
	const word = ["php", "css"];
	const string = "我喜欢在后盾人学习php与css知识";
	const title = word.reduce((pre, word) => {
	  return pre.replace(word, `<a href="?w=${word}">${word}</a>`);
	}, string);
	console.log(title) ;
	
	document.body.innerHTML += title;

	</script>
</body>
</html>